package nc.bs.common.util;

/**
 * @author duanyp1
 * @date 2024/3/19 17:31
 */
public enum GlDocFreeItem {

    DEPT("0001", "部门", "code","f1"),
    PSNDOC("0002", "人员", "code","f2"),
    CASHFLOW("0007", "现金流量项目", "code","f7"),
    CUSTOMER("0017", "客户", "code","f13"),
    SUPPLIER("0019", "供应商", "code","f14"),
    HRP002("HRP002", "经费类型", "code",""),
    HRP004("HRP004", "拨款种类", "code",""),
    HRP005("HRP005", "项目名称", "code",""),
    HRPZCGNFL("HRP-ZCGNFL", "支出功能分类科目", "code",""),
    ;

    String code;
    String name;
    String columnCode;
    String assIdColumnCode;

    GlDocFreeItem(String code, String name, String columnCode,String assIdColumnCode) {
        this.code = code;
        this.name = name;
        this.columnCode = columnCode;
        this.assIdColumnCode = assIdColumnCode;
    }

    public String getAssIdColumnCode() {
        return assIdColumnCode;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public String getColumnCode() {
        return columnCode;
    }

    public static GlDocFreeItem getItemByCode(String code) {
        for (GlDocFreeItem item : GlDocFreeItem.values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }

}
